<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@include file="/common/jsp/taglibs-nojs-nocss.jsp"%>
<%@ page isELIgnored="false" %>
<%
	String path_part = request.getContextPath();
	String basePathter = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path_part + "/";
%>
<style type="text/css">
.bg td{
	font-size:12px;
	text-align:left;
	line-height:15px;
	height:20px;
	table-layout:fixed!important;
}
.bg td.tit{
    background-color:#e2e2e2;
    height:17px;
	text-align:center;
	line-height:15px;
	table-layout:fixed!important;
}
.bg td.num{
    background-color:#e2e2e2;
	text-align:right;
	line-height:15px;
	width:30px;
	height:22px;
	table-layout:fixed!important;
}
.resizeDivClass{
   text-align:right;
   width:2px;
   margin:0px 0 0px 0;
   background:#fff;
   border:2px;
   float:right;
   cursor:e-resize;
   table-layout:fixed!important;
} 
</style>
<body onload="setTableLayoutToFixed()"></body>
<div class="wbs_scroll" style="height:390px;overflow-x:scroll;">
<table width="100%" class="gridview" border=1 cellspacing=0 id="theObjTable">
		<tr class="title">
			<td width="4%"  align="center" class="num" ><span class="resizeDivClass" onMouseDown="MouseDownToResize(this);" onMouseMove="MouseMoveToResize(this);" onMouseUp="MouseUpToResize(this);"></span>序号</td>
			<td width="12%" align="center" class="tit" ><span class="resizeDivClass" onMouseDown="MouseDownToResize(this);" onMouseMove="MouseMoveToResize(this);" onMouseUp="MouseUpToResize(this);"></span>项目名称</td>
			<td width="12%"  align="center" class="tit"><span class="resizeDivClass" onMouseDown="MouseDownToResize(this);" onMouseMove="MouseMoveToResize(this);" onMouseUp="MouseUpToResize(this);"></span>项目单位</td>
			<td width="8%" align="center"  class="tit" ><span class="resizeDivClass" onMouseDown="MouseDownToResize(this);" onMouseMove="MouseMoveToResize(this);" onMouseUp="MouseUpToResize(this);"></span>招标日期</td>
			<td width="10%" align="center" class="tit"><span class="resizeDivClass" onMouseDown="MouseDownToResize(this);" onMouseMove="MouseMoveToResize(this);" onMouseUp="MouseUpToResize(this);"></span>产品名称</td>
			<td width="6%" align="center" class="tit" ><span class="resizeDivClass" onMouseDown="MouseDownToResize(this);" onMouseMove="MouseMoveToResize(this);" onMouseUp="MouseUpToResize(this);"></span>业务员</td>
			<td width="6%" align="center" class="tit" ><span class="resizeDivClass" onMouseDown="MouseDownToResize(this);" onMouseMove="MouseMoveToResize(this);" onMouseUp="MouseUpToResize(this);"></span>总价</td>
			<%--
			<td width="7%" align="center">中标单位</td>
			<td width="6%" align="center" >投标金额</td>
			<td width="6%" align="center" >其它费</td>
			 --%>
			<td width="6%" align="center" class="tit" ><span class="resizeDivClass" onMouseDown="MouseDownToResize(this);" onMouseMove="MouseMoveToResize(this);" onMouseUp="MouseUpToResize(this);"></span>标书费</td>
			<td width="8%" align="center" class="tit" ><span class="resizeDivClass" onMouseDown="MouseDownToResize(this);" onMouseMove="MouseMoveToResize(this);" onMouseUp="MouseUpToResize(this);"></span>投标保证金</td>
			<td width="8%" align="center" class="tit" ><span class="resizeDivClass" onMouseDown="MouseDownToResize(this);" onMouseMove="MouseMoveToResize(this);" onMouseUp="MouseUpToResize(this);"></span>中标服务费</td>
			<td width="6%" align="center" class="tit" ><span class="resizeDivClass" onMouseDown="MouseDownToResize(this);" onMouseMove="MouseMoveToResize(this);" onMouseUp="MouseUpToResize(this);"></span>状态</td>
			<td width="6%" align="center" class="tit" ><span class="resizeDivClass" onMouseDown="MouseDownToResize(this);" onMouseMove="MouseMoveToResize(this);" onMouseUp="MouseUpToResize(this);"></span>备注</td>
			<td class="nowrap">
				操作
			</td>
		</tr>
		<s:if test="wrapperList!=null && wrapperList.size()>0">
			<s:iterator id="wrapperList" value="wrapperList" status="status">
				<tr <s:if test="#status.odd"> class="odd_title" </s:if><s:else>class="even_title "</s:else>>
					<td width="4%"><s:property value="#status.count"/></td>
					<td width="12%" title="${projectName}">${projectName}</td>
					<td width="12%" title="${biddingUnit}">${biddingUnit}</td>
					<td width="8%">${biddingTime}</td>
					<td width="10%" title="${productName}">${productName}</td>
					<td width="6%">${salesManName}</td>
					<td width="6%" align="right">${totalPrice}</td>
					<%--
					<td width="7%">${bidUnit}</td>
					<td width="6%">${tenderMoney}</td>
					<td width="6%">${otherPrice}</td>
					 --%>
					<td width="6%" align="right">${bidBookPrice}</td>
					<td width="8%" align="right">${tenderMargin}</td>
					<td width="8%" align="right">${bidServicePrice}</td>
					
					<td width="6%">
						<s:if test="status==0">
							<span class="red">待确认</span>
						</s:if>
						<s:elseif test="status==1">
							<span class="red">已确认</span>
						</s:elseif>
						<s:elseif test="status==2">
							<span class="red">待审批</span>
						</s:elseif>
						<s:elseif test="status==3">
							<span class="red">已生效</span>
						</s:elseif>
					
					</td>
					<td width="6%">${mark}</td>
					<td class="nowrap">
						<a class="icon_tools menu_arrow_down" href="javascript:void(0);" onClick="openmenu(this , 'bidBookAction!gotoBidBookMenu.action?id=${id}');">▼</a>
			        </td>
				</tr>
			</s:iterator>
		</s:if>
		<s:else>
			<tr>
				<td align="center" colspan="10">
					无记录
				</td>
			</tr>
		</s:else>
</table>
</div>
<%@include file="../../common/jsp/pageing.jsp" %>
<script>
	// 文本超过8个字符数时，用省略显示
		text_overflow( 10 );
	 	//查询方法
		function searchBidBookBySearchKey(){
			var projectName = document.getElementById("condition.projectName").value;
			var biddingUnit=document.getElementById("condition.biddingUnit").value;
			var productName=document.getElementById("condition.productName").value;
			var biddingTime = document.getElementById("condition.biddingTime").value;
			var url1 = 'bidBookAction!findAllBidBook.action?condition.projectName='+projectName;
			var url2='&condition.biddingUnit='+biddingUnit;
			var url3='&condition.productName='+productName;
			var url4='&condition.biddingTime='+biddingTime;
			var url=url1+url2+url3+url4;
			location.href=encodeURI(url);
			//loadContent('_econTargetList_div_id', url, function(){
			//setGridCss();
			//})
		}
        // 分页
		function gotoPage( pageNo , totalPage , pageSize ){
			// 按page的信息加载数据
			// 如果当前页大于了最大页数就弹出警告
			if( pageNo > totalPage ){
				window.alert( '总页数为'+totalPage+' , 请重新输入页码!' );
				return;
			}
			var url='bidBookAction!listBidBookByPage.action?page.pageNo='+pageNo+
			'&page.totalPage='+totalPage+'&page.pageSize='+pageSize+
			'&condition.projectName=<s:property value="condition.projectName"/>'+
			'&condition.biddingUnit=<s:property value="condition.biddingUnit"/>'+
			'&condition.productName=<s:property value="condition.productName"/>'+
			'&condition.biddingTime=<s:property value="condition.biddingTime"/>'+
			'&condition.applyMan=<s:property value="condition.applyMan"/>';
			location.href=encodeURI(url);
			// 加载数据
			//loadContent( '_econTargetList_div_id' , url,function() {setGridCss();setGridOddEvenCss();} );
		}
</script>
<script language="javascript">
	function MouseDownToResize(obj){
		setTableLayoutToFixed(); 
		obj.mouseDownX=event.clientX; 
		obj.pareneTdW=obj.parentElement.offsetWidth; 
		obj.pareneTableW=theObjTable.offsetWidth; 
		obj.setCapture(); 
	} 
	function MouseMoveToResize(obj){ 
	    if(!obj.mouseDownX) return false; 
	    var newWidth=obj.pareneTdW*1+event.clientX*1-obj.mouseDownX; 
	    if(newWidth>10){
			var theObjTable = document.getElementById("theObjTable");
			obj.parentElement.style.width = newWidth; 
			theObjTable.style.width=obj.pareneTdW*1+event.clientX*1-obj.mouseDownX; 
		} 
	} 
	function MouseUpToResize(obj){ 
		obj.releaseCapture(); 
		obj.mouseDownX=0; 
	} 
	function setTableLayoutToFixed() 
	{ 
	 var theObjTable = document.getElementById("theObjTable");
	 if(theObjTable.style.tableLayout=='fixed') return; 
	    var headerTr=theObjTable.rows[0]; 
	    for(var i=0;i<headerTr.cells.length;i++){ 
	   		headerTr.cells[i].styleOffsetWidth=headerTr.cells[i].offsetWidth; 
	    } 
	    for(var i=0;i<headerTr.cells.length;i++){ 
	    	headerTr.cells[i].style.width=headerTr.cells[i].styleOffsetWidth; 
	    } 
	    theObjTable.style.tableLayout='fixed'; 
	} 
</script> 